//
//  BGShopTableViewCell.m
//  bigMall
//
//  Created by LTOVE on 16/7/20.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGShopTableViewCell.h"
#import "BGShopCellModel.h"

@interface BGShopTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *GuaDanFangShi;
@property (weak, nonatomic) IBOutlet UILabel *baoZhengJIn;
@property (weak, nonatomic) IBOutlet UILabel *priceNow;
@property (weak, nonatomic) IBOutlet UILabel *kuCun;
@property (weak, nonatomic) IBOutlet UILabel *caiFen;
@property (weak, nonatomic) IBOutlet UILabel *addr;
@property (weak, nonatomic) IBOutlet UILabel *jiaoHuoFangShi;
@property (weak, nonatomic) IBOutlet UILabel *title;

@end

static NSString *const reuseIdentify = @"cell";
static UITableView *_tableView = nil;

@implementation BGShopTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Configure the view for the selected state
}

+ (instancetype)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath
{
    if (!_tableView) {
        _tableView = tableView;
        [tableView registerNib:[UINib nibWithNibName:@"BGShopTableViewCell" bundle:nil] forCellReuseIdentifier:reuseIdentify];
    }
    
    
    
    
    
    
    return [tableView dequeueReusableCellWithIdentifier:reuseIdentify];
    
//    if (!_tableView) {
//        _tableView = tableView;
//        [tableView registerNib:[UINib nibWithNibName:@"BGAuctionTableViewCell" bundle:nil] forCellReuseIdentifier:reuseIdentify];
//    }
//    return [tableView dequeueReusableCellWithIdentifier:reuseIdentify forIndexPath:indexPath];
//    
}
/*
 @property (weak, nonatomic) IBOutlet UILabel *GuaDanFangShi;
 @property (weak, nonatomic) IBOutlet UILabel *baoZhengJIn;
 @property (weak, nonatomic) IBOutlet UILabel *priceNow;
 @property (weak, nonatomic) IBOutlet UILabel *kuCun;
 @property (weak, nonatomic) IBOutlet UILabel *caiFen;
 @property (weak, nonatomic) IBOutlet UILabel *addr;
 @property (weak, nonatomic) IBOutlet UILabel *jiaoHuoFangShi;
 */

- (void)setModel:(BGShopCellModel *)model
{
    _model = model;
    self.GuaDanFangShi.text = model.GuaDanFangShi;
    self.baoZhengJIn.text = model.baoZhengJIn;
    self.priceNow.text = model.priceNow;
    self.kuCun.text = model.kuCun;
    self.caiFen.text = model.caiFen;
    self.addr.text = model.addr;
    self.jiaoHuoFangShi.text = model.jiaoHuoFangShi;
    self.title.text = model.title;
    
}
@end
